<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.fy.model.Student" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>信息修改成功</title>
		<meta name="keywords" content="学生,信息,管理,系统">
		<meta name="description" content="学生信息管理系统">
		<%@ include file="../public/head.jspf"%>
	</head>
	<body>
		<div class="box">
			<h1>学生信息管理系统<a class="back">返回</a></h1>
			<div class="content">
				<div id="data">
					<table id="datalist">
						<caption>修改后的学生信息如下</caption>
						<tr>
							<th>学号</th>
							<th>姓名</th>
							<th>年龄</th>
							<th>性别</th>
							<th>专业</th>
						</tr>
					    <%
					    	response.setCharacterEncoding("UTF-8");
			    	    	request.setCharacterEncoding("UTF-8");
			    	    	ArrayList<Student> result = new ArrayList<Student>();
			    	    	result = (ArrayList<Student>) request.getAttribute("result");
			    	    	if (!result.isEmpty()) {
			    	    		for (int i = 0; i < result.size(); i++) {
			    	    			Student st = result.get(i);
			    	    			out.println("<tr>");
			    	    			out.println("							<td>" + st.getId() + "</td>");
			    	    			out.println("							<td>" + st.getName() + "</td>");
			    	    			out.println("							<td>" + st.getAge() + "</td>");
			    	    			out.println("							<td>" + st.getGender() + "</td>");
			    	    			out.println("							<td>" + st.getMajor() + "</td>");
			    	    			out.print("						</tr>");
			    	    		}
			    	    	}
					    %>
					    <tr>
							<td colspan="5">
								<input type="button" class="btn blue" value="查看列表"
									onclick="location.href='students?methodName=1'" />
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</body>
</html>